/** @format */

export * from './errorCode'

// tb 接口返回部分错误
export const TBERROR = {
  USER_PERMISSION_EXCEED_MAX_RIGHT_COUNT_IN_DAY: '今日领取达到上限，明日再来领取哦',
  COUPON_INVALID_OR_DELETED: '权益无效或者被删除，请联系商家',
  APPLY_OWNSELF_COUPON: '不能领取自己家店铺权益',
  APPLY_SINGLE_COUPON_COUNT_EXCEED_LIMIT: '请至卡券包删除无用权益再领取',
  NO_RIGHT_QUANTITY: '权益库存不足，请联系商家',
  ERRORA_3_567: '领取失败，为风险用户',
  'Invalid session': '订购应用已过期，请联系商家处理'
}

export const TRACK_EVENTS = {
  ENTER: 'wildwoodmg:app_entered',
  FIRST_ENTER: 'wildwoodmg:app_first_entered',
  JOIN_GAME: 'wildwoodmg:app_join',
  FINISH_GAME: 'wildwoodmg:app_finish_game',
  FINISH_TASK: 'wildwoodmg:app_finish_task',
  SHARE: 'wildwoodmg:app_share',
  BACK_HOME: 'wildwoodmg:app_back',
  EXIT: 'wildwoodmg:app_exit',
  OUT_SIDE: 'wildwoodmg:navigateToOutSide',
  HTTP_API: 'wildwoodmg:httpApi',
  EXCEPTION: 'wildwoodmg:exception',
  TOP_API: 'wildwoodmg:topApi',
  MEMBER_CHECK: 'wildwoodmg:memberCheck',
  DRAW_PRIZE: 'wildwoodmg:app_draw_prize',
  GET_AWARD: 'wildwoodmg:app_get_award'
}

// export const API_URL_LIST = {
//   MEMBER_CHECK: {
//     domain: 'https://tmall-origin.gc.nike.com',
//     path: '/prod/v1/checkbind'
//   },
//   DATA_TRACK: {
//     domain: 'https://tmall-origin.gc.nike.com',
//     path: '/common-log/tmall-logger-api/receiver'
//   },
//   FINISH_TASK: {
//     onlineDomain: 'https://tmall-origin.gc.nike.com',
//     testDomain: 'https://tmall-origin.gc-uat.nike.com',
//     path: '/wildwood/wildwood-api/challenges',
//     qimenPath: '/challenges',
//     sbdQimenPath: '/wildwood/wildwood-api/challenges',
//     qimen618Path: '/wildwood/wildwood-api/challenges'
//   },
//   GET_INFO: {
//     onlineDomain: 'https://tmall-origin.gc.nike.com',
//     testDomain: 'https://tmall-origin.gc-uat.nike.com',
//     qimenPath: '/profile/get',
//     sbdQimenPath: '/wildwood/wildwood-api/profile/get',
//     qimen618Path: '/wildwood/wildwood-api/profile/get'
//   },
//   SEND_AVATAR: {
//     onlineDomain: 'https://tmall-origin.gc.nike.com',
//     testDomain: 'https://tmall-origin.gc-uat.nike.com',
//     qimenPath: '/avatar/send',
//     sbdQimenPath: '/wildwood/wildwood-api/avatar/send',
//     qimen618Path: '/wildwood/wildwood-api/avatar/send'
//   },
//   REGISTER: {
//     //只有register要调用奇门
//     qimenPath: '/third-party/register',
//     sbdQimenPath: '/wildwood/wildwood-api/third-party/register',
//     qimen618Path: '/wildwood/wildwood-api/third-party/register'
//   }
// }

export const BASE_CONFIG = {
  API_URL_LIST: {
    MEMBER_CHECK: {
      domain: 'https://tmall-origin.gc.nike.com',
      path: '/prod/v1/checkbind'
    },
    DATA_TRACK: {
      domain: 'https://tmall-origin.gc.nike.com',
      path: '/common-log/tmall-logger-api/receiver'
    },
    FINISH_TASK: {
      domain: 'https://tmall-origin.gc-uat.nike.com',
      path: '/wildwood/wildwood-api/challenges',
      qimenPath: '/challenges'
    },
    GET_INFO: {
      domain: 'https://tmall-origin.gc-uat.nike.com',
      qimenPath: '/profile/get',
      path: '/wildwood/wildwood-api/profile/get'
    },
    SEND_AVATAR: {
      domain: 'https://tmall-origin.gc-uat.nike.com',
      qimenPath: '/avatar/send',
      path: '/wildwood/wildwood-api/avatar/send'
    },
    REGISTER: {
      //只有register要调用奇门
      path: "/earlybird/register",
      qimenPath: "/earlybird/register"
    }
  },
  SET_AVATER_URL: {
    10002: 'https://m.duanqu.com/?_ariver_appid=3000000052178171&_mp_code=tb&transition=present&page=pages/initAvatar/initAvatar',
    10003: 'https://m.duanqu.com?_ariver_appid=3000000048426063&nbsv=0.9.50&nbsource=debug&nbsn=TRIAL&_mp_code=tb&transition=present&page=pages/initAvatar/initAvatar', //'https://m.duanqu.com?_ariver_appid=3000000048426063&_mp_code=tb&transition=present&page=pages/initAvatar/initAvatar',
    10014: 'https://m.duanqu.com?_ariver_appid=3000000048426063&nbsv=0.8.2&nbsource=debug&nbsn=TRIAL&_mp_code=tb&transition=present&page=pages/initAvatar/initAvatar'
  }
}

// 领取奖品状态
export const DRAW_STATUS = {
  // 待领取
  WAITAWARD: 1,
  // 处理中
  PROCESSING: 2,
  // 领取成功
  SUCCESS: 3,
  // 领取失败
  FAIL: 4,
  // 已过期
  EXPIRED: 5,
  // 重新领取
  RETRY: 6
}

// 订单状态
export const TAOBAO_SUCCESS_ORDER_STATUS: string[] = [
  'WAIT_SELLER_SEND_GOODS',
  'SELLER_CONSIGNED_PART',
  'WAIT_BUYER_CONFIRM_GOODS',
  'TRADE_BUYER_SIGNED',
  'TRADE_FINISHED',
  'PAID_FORBID_CONSIGN'
]

export const ACTIVITY_OPEN_PRIZE_STATUS = {
  //开奖状态
  AWAIT: 1,
  OPENING: 2,
  SUCCESS: 3,
  FAIL: 4
}

// 活动状态
export enum ACTIVITY_STATUS {
  NORMAL = 1,
  DELETE = 2
}

// 奖品状态
export enum DELETE_STATUS {
  NORMAL = 1,
  DELETE = 2
}

//任务频率类型常量
export const TASK_RATE_TYPE = {
  FOREVER: 1,
  EVERYDAY: 2,
  NOLIMIT: 3
}

//任务状态
export const TASK_STATUS = {
  WAIT_DO: 1, // 未完成
  WAIT_RECEIVE: 2, // 待领取
  DONE: 3 // 已完成
}

// 奖品类型
export const PRIZE_TYPE = {
  ENAME: 1,
  CREDITS: 2,
  OBJECT: 3,
  THANKS: 5,
  CARD: 6
}

export const THIRTY_DAY = 30 * 24 * 60 * 60 * 1000

// 权益类型
export const BENEFIT_TYPE = {
  NORMAL: 1, // 普通权益
  MEMBER: 2 // 会员权益
}

// 奖品分类
export const PRIZE_DATA_TYPE = {
  LUCK: 1
}

// 奖品是否限制库存
export enum SWICH_TOCK {
  LIMIT = 1,
  NO_LIMIT = 2
}

//物流状态
export const SHIP_STATUS = {
  NO_ADDRESS: 1,
  NO_SHIP: 2,
  HAS_SHIP: 3
}

// 记录数据
export enum STAT_TYPE {
  INITE_SUCCESS,
  COMPLETE_GUIDE,
  BACK_HOME, //回到首页
  CLICK_TIME, //点击加时卡
  JUMP_PRODUCT, // 跳转产品墙
  SHARE_SCORE, // 成绩分享
  SHARE_NORMAL, // 自带分享
  SHARE_TIME, // 加时卡分享
  JOIN_BY_PWD // 口令进入
}

// 每次参与消耗次数
export const JOIN_NEED_TIMES = 1

export const appId = '3000000077842553'

export const SELLER_SHOP_CONFIG = {
  10002: '890482188',
  10003: '3327042818',
  10014: '3728394127'
}

export const APPKEY = '32903603'
// 商铺id 拼接vip链接用
export const sellerId = '654321'

// C端的APP NAME
export const C_APP_NAME: string = `promotioncenter-${appId}`

export const activityName = 'nike早鸟场'

export const phone = '15757164351'

export const TARGET_APPKEY = '34367277'

//appkey
export const APP_KEY = '34367277'
//oss地址
// export const OSS_URL = 'https://niek-wildwood.oss-cn-beijing.aliyuncs.com/10002/avatar/'

export const OSS_URL = 'https://tmall-origin-static.nike.com.cn/awatar_base/'